package com.example.myapplication.fragment;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.example.myapplication.R;
import com.example.myapplication.databinding.FragmentTianqi2Binding;
import com.example.tqlibrary.javabean.databean;

import java.util.List;

/**
 * A simple {@link Fragment} subclass.
 */

//Tianqi2Fragment为界面二，采用图标的方式提供生活指南，为各大天气app必备内容
public class Tianqi2Fragment extends Fragment {
    List<databean.HeWeather6Bean> lifestyleBeanList;
    public Tianqi2Fragment(List<databean.HeWeather6Bean> lifestyleBeanList) {
        this.lifestyleBeanList = lifestyleBeanList;
    }
    FragmentTianqi2Binding tianqi2Binding;

   //图片固定，下方按钮进行改变后传值
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        tianqi2Binding= FragmentTianqi2Binding.inflate( inflater );
        tianqi2Binding.text1.setText(lifestyleBeanList.get(0).getLifestyle().get(1).getBrf()+"");
        tianqi2Binding.text2.setText(lifestyleBeanList.get(0).getLifestyle().get(4).getBrf()+"");
        tianqi2Binding.text3.setText(lifestyleBeanList.get(0).getLifestyle().get(2).getBrf()+"");
        tianqi2Binding.text4.setText(lifestyleBeanList.get(0).getLifestyle().get(6).getBrf()+"");
        tianqi2Binding.text5.setText(lifestyleBeanList.get(0).getLifestyle().get(3).getBrf()+"");
        tianqi2Binding.text6.setText(lifestyleBeanList.get(0).getLifestyle().get(5).getBrf()+"");
        return tianqi2Binding.getRoot();
    }
}
